<?php

namespace common\entities\common;

use common\entities\ConfigEntity;
use Yii;

/**
 * This is the model class for table "myscrm_xunjian_database".
 *
 * @property string $id
 * @property string $org_code
 * @property string $database_name
 * @property string $database_instance_id
 * @property string $created_at
 * @property string $status
 */
class MyscrmXunjianDatabaseEntity extends ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_xunjian_database';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'org_code', 'database_name', 'database_instance_id'], 'required'],
            [['created_at'], 'safe'],
            [['id', 'database_instance_id'], 'string', 'max' => 36],
            [['org_code', 'database_name'], 'string', 'max' => 255],
            [['status'], 'string', 'max' => 45]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'org_code' => '组织CODE',
            'database_name' => '数据库名称',
            'database_instance_id' => 'DB实例ID',
            'created_at' => '创建时间',
            'status' => '状态 enable:启用 disable:禁用',
        ];
    }
}
